home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group97a.txt
/
000080_icon-group-sender _Wed Mar 12 10:01:04 1997.msg
< prev
next >
Wrap
Internet Message Format
|
2000-09-20
|
3KB
Received: by cheltenham.cs.arizona.edu; Fri, 14 Mar 1997 10:39:14 MST
To: icon-group@cs.arizona.edu
Date: Wed, 12 Mar 1997 10:01:04 -0800
From: Brian Rogoff <bpr@best.com>
Message-Id: <Pine.SGI.3.95.970312094539.9196B-100000@shellx.best.com>
Sender: icon-group-request@cs.arizona.edu
References: <Pine.SGI.3.95.970305103012.2721A-100000@shellx.best.com>, <01bc2d80$5cac97d0$5f030514@dschauma>
Subject: Modules in Icon (Was Re: Recursive directory traversal in Icon)
Errors-To: icon-group-errors@cs.arizona.edu
Status: RO
Content-Length: 2180
Dave Schaumann wrote:
> Brian Rogoff <bpr@best.com> wrote in article
> <Pine.SGI.3.95.970305103012.2721A-100000@shellx.best.com>...
> > Hi,
> > I've been reading the Icon web references, trying to decide if I
> > should forsake Perl in favor of Icon, and I have two questions.
> >
> > (1) How do I traverse a hierarchical directory structure in Icon? I found
>
> > chdir, but I didn't find the equivalent of 'ls' and 'stat'. Is there
> > a way to do this in Icon, or do you rely on the external environment?
>
> This is one of the biggest weaknessess of Icon, especially wrt languages
> like Perl -- the support for access to the OS is highly limited. The file
> IO system works pretty good, as does the extension to X. But other than
> that, about all that's available is system() and popen() (which may or may
> not have a reasonable analog available on non-Un*x systems).
As I suspected. Some people sent me system dependent solutions to
the problem, but that's not what I wanted. This is really too bad. Icon has
some terrific ideas in it, but it looks like it isn't for me.
> > (2) Why no module system?
>
> I can't answer this directly. However, there is Idol, which has been
> described
> as "Object Oriented Icon". That's pretty much all I know about it, so I
> don't
> know if it supports modules. I assume that "Object Oriented" means
> inheritence,
> which means classes, which means some form of encapsulation/data hiding...
Yup, I looked at Idol. What I want are modules or packages. In *my*
religion, import is not inheritance ;-). The Eiffel heretics among you
probably disagree. OTOH, an object system would be nice too, but modules
are way more important. Consider that with modules, all of that system
stuff like chdir and "lsdir" and "stat" could go into an Icon.File_Systems
module and not pollute the global name space.
> I agree with your point, though. Another big weakness of Icon is that
> there's just too much stuff that goes in the global name space.
Exactly the problem that modules would solve.
I'm beginning to think that lots of people have asked about this or
wanted it, but this isn't in the FAQ.
-- Brian